package com.rdd.action

import org.apache.spark.{SparkConf, SparkContext}

object testCount {

  def main(args: Array[String]): Unit = {

    val conf = new SparkConf().setAppName("testCount").setMaster("local")
    val sc = new SparkContext(conf)

    val txt = sc.textFile("src\\main\\scala\\testTxt.txt").flatMap(_.split(" "))
    val l = txt.count()
    println(l)

    sc.stop()
  }

}
